import request from '@/utils/request'

// 查询学校公寓列表
export function listDist(query) {
  return request({
    url: '/apartment/dist/list',
    method: 'get',
    params: query
  })
}

// 查询学校公寓详细
export function getDist(id) {
  return request({
    url: '/apartment/dist/' + id,
    method: 'get'
  })
}

// 新增学校公寓
export function addDist(data) {
  return request({
    url: '/apartment/dist',
    method: 'post',
    data: data
  })
}

// 修改学校公寓
export function updateDist(data) {
  return request({
    url: '/apartment/dist',
    method: 'put',
    data: data
  })
}

// 删除学校公寓
export function delDist(id) {
  return request({
    url: '/apartment/dist/' + id,
    method: 'delete'
  })
}
